package com.example.jetpack;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;
import android.os.Bundle;
import com.example.jetpack.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ActivityMainBinding activityMainBinding = DataBindingUtil.setContentView(this,R.layout.activity_main);
        activityMainBinding.setIdol(new IdolEntity("斯嘉丽.约翰逊",5));
        //一张图片传递两个地址参数，网络地址不传时，就加载本地图片
        //activityMainBinding.setNetworkImage("https://img0.baidu.com/it/u=3119542616,1165410720&fm=26&fmt=auto");
        activityMainBinding.setDefaultImageResource(R.mipmap.aaa);
        activityMainBinding.setUserViewModel(new UserViewModelTwo());
        //我现在是zhan分支  ，提交以下
        activityMainBinding.setUserViewModel(new UserViewModelTwo());
        activityMainBinding.setDefaultImageResource(R.mipmap.aaa);
        activityMainBinding.setUserViewModel(new UserViewModelTwo());


    }

}